<!DOCTYPE html>
<html lang="zh" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('对账单详情')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <div class="row">
        <div class="col-sm-4 col-sm-offset-4"><h3>对账单</h3></div>
    </div>
    <div class="row">
        <div class="col-sm-4 col-sm-offset-4"><span th:text="${#dates.format(financeSettlement.startTime, 'yyyy-MM-dd')}"></span>-<span th:text="${#dates.format(financeSettlement.endTime, 'yyyy-MM-dd')}"></span></div>
        <div class="col-sm-4">生成时间：<span th:text="${#dates.format(financeSettlement.createTime, 'yyyy-MM-dd')}"></span></div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">

                    <table class="table">
                        <tbody>
                        <tr>
                            <td><strong>商家名称：</strong></td>
                            <td><span th:text="${store.name}"></span></td>
                            <td><strong>合作平台：</strong></td>
                            <td>物连家美</td>
                        </tr>
                        <tr>
                            <td><strong>商家地址：</strong></td>
                            <td><span th:text="${store.companyAddress}"></span></td>
                            <td><strong>平台地址：</strong></td>
                            <td>广东省深圳市南山区创维大厦</td>
                        </tr>
                        <tr>
                            <td><strong>商家电话：</strong></td>
                            <td><span th:text="${store.supportPhone}"></span></td>
                            <td><strong>平台电话：</strong></td>
                            <td>0755-86548995</td>
                        </tr>
                        <tr>
                            <td><strong>结算周期：</strong></td>
                            <td><span th:text="${#dates.format(financeSettlement.startTime, 'yyyy-MM-dd')}"></span>-<span th:text="${#dates.format(financeSettlement.endTime, 'yyyy-MM-dd')}"></span></td>
                            <td></td>
                            <td></td>
                        </tr>
                        </tbody>
                    </table>

                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-6"><h3>请认真核对本期对账单！</h3></div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <p>订单总额：￥<span th:text="${financeCheck.totalOrderAmount}"></span>
                实付总额：￥<span th:text="${financeCheck.totalPayAmount}"></span>
                优惠总额：￥<span th:text="${financeCheck.totalDiscountAmount}"></span>
                退款总额：￥<span th:text="${financeCheck.totalRefundAmount}"></span>
                对账单金额：￥<span th:text="${financeCheck.totalSettleAmount}"></span></p>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12 select-table table-striped">
            <table data-mobile-responsive="true" id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "finance/financeCheck";

    $(function () {
        var options = {
            url: prefix + "/list",
            modalName: "对账单列表",
            columns: [{
                checkbox: true
            },
                {
                    field: 'id',
                    title: '编号',
                    visible: false
                },
                {
                    field: 'orderSn',
                    title: '订单编号'
                },
                {
                    field: 'dateStr',
                    title: '订单日期'
                },
                {
                    field: 'memberName',
                    title: '用户账号'
                },
                {
                    field: 'orderAmount',
                    title: '订单金额'
                },
                {
                    field: 'payAmount',
                    title: '实付金额'
                },

                {
                    field: 'discountAmount',
                    title: '优惠金额'
                },

                {
                    field: 'refundAmount',
                    title: '退款金额'
                },
                {
                    field: 'settleAmount',
                    title: '对账单金额'
                },
                {
                    field: 'createTime',
                    title: '创建时间'
                }
            ]
        };
        $.table.init(options);
    });
</script>
</body>
</html>
